package com.example.foo.admin.web.ftt;

import org.springframework.web.bind.annotation.GetMapping;

import com.ruoyi.common.core.domain.AjaxResult;
import com.example.core.PageResult;
import com.example.core.Pageable;
import com.example.foo.ftt.model.FttUserProfit;
import com.example.foo.ftt.query.FttUserProfitQuery;
import com.example.foo.ftt.service.FttUserProfitService;

@org.springframework.web.bind.annotation.RestController
public class FttUserProfitAction {

	private final FttUserProfitService fttUserProfitService;

	public FttUserProfitAction(FttUserProfitService fttUserProfitService) {
		this.fttUserProfitService = fttUserProfitService;
	}

	@GetMapping("/api/fttuserprofits")
	public AjaxResult index(FttUserProfitQuery fttUserProfitQuery, Pageable pageable) {
		PageResult<FttUserProfit> pageResult = fttUserProfitService.findFttUserProfits(fttUserProfitQuery, pageable);
		return AjaxResult.successData(pageResult);
	}

}
